<template>
  <div class="tabBox">
      <el-tabs v-model="activeName" @tab-click="handleClick">
        <el-tab-pane v-if="this.menuList.includes('groupReportList')" label="团体报告" name="group">
          <group></group>
        </el-tab-pane>
        <el-tab-pane v-if="this.menuList.includes('independentReport')" label="个人报告" name="personal">
          <personal></personal>
        </el-tab-pane>
      </el-tabs>
    </div>
</template>
<script>
import group from './components/group'
import personal from './components/personal'
export default {
  components: {
    personal,
    group
  },
  data () {
    return {
      activeName: 'group',
      activeList: ['group', 'personal'],
      menuList: []
    }
  },
  created () {
    this.menuList = sessionStorage.getItem('list')
  },
  methods: {
    handleClick () {
      this.$cookies.set('activeName', this.activeName)
    }
  }
}
</script>
